<?php
namespace app\common\validate;

use think\Validate;

class CountdownValidate extends Validate
{
    protected $rule =   [
        'title'  => 'require|max:50',
        'closing_date' => 'require',
        'time_slot' => 'require',
		'sort'	=> 'require|number'
    ];
    
    protected $message  =   [
        'title.require' => '通知标题必须填写',
        'title.max'     => '通知标题最多不能超过50个字符',
        'time_slot.require'=> '时间段必须选择',
		'closing_date.require'=> '截止日期必须选择',
		'sort.number' => '必须输入数字',
    ];
    
    protected $scene = [
        'add'  =>  ['title','time_slot','closing_date','sort'],
        'edit'  => ['title','time_slot','closing_date','sort'],
		'sort' => ['sort']
    ];
}
